package com.ruicar.afs.cloud.apply.contract.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruicar.afs.cloud.apply.common.entity.ApplyCarInvoice;
import com.ruicar.afs.cloud.apply.contract.mapper.ApplyCarInvoiceMapper;
import com.ruicar.afs.cloud.apply.contract.service.ApplyCarInvoiceService;
import org.springframework.stereotype.Service;

/**
 * @author: Lee
 * @date: 2020/5/13 21:19
 * @description:
 */
@Service
public class ApplyCarInvoiceServiceImpl extends ServiceImpl<ApplyCarInvoiceMapper, ApplyCarInvoice> implements ApplyCarInvoiceService {

    /**
     * 通过申请编号获取发票信息
     * @param applyNo
     * @return
     */
    public ApplyCarInvoice getApplyCarInvoice(String applyNo){

        ApplyCarInvoice applyCarInvoice = this.baseMapper.selectOne(Wrappers.<ApplyCarInvoice>query().lambda().eq(ApplyCarInvoice::getApplyNo,applyNo));
        return applyCarInvoice;
    }

}
